<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>电子书城</title>
<link rel="stylesheet" href="css/main.css" type="text/css" />
</head>

<body class="main">

	<jsp:include page="head.jsp" />

	<jsp:include page="menu_search.jsp" />


	<div id="divpagecontent">
		<table width="100%" border="0" cellspacing="0">
			<tr>

				<td><div style="text-align:right; margin:5px 10px 5px 0px">
						<a href="index.jsp">首页</a>&nbsp;&nbsp;&nbsp;&nbsp;&gt;&nbsp;&nbsp;&nbsp;
						<a href="product_list.html">&nbsp;计算机</a>&nbsp;&nbsp;&nbsp;&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;Thinking In Java
					</div>





					<table cellspacing="0" class="infocontent">
						<tr>
							<td><img src="ad/page_ad.jpg" width="645" height="84" />

								<table width="100%%" border="0" cellspacing="0">
									<tr>
										<td width="30%">

											<div class="divbookcover">
												<p>
													<img src="${pd.pimage }"
														width="213" height="269" border="0" />
												</p>
											</div>

											<div style="text-align:center; margin-top:25px">
									
											<img src="images/buybutton.gif" border="0" id="imgbutton" /> 
							
											</div></td>
										<td style="padding:20px 5px 5px 5px"><img
											src="images/miniicon3.gif" width="16" height="13" /><font
											class="bookname">&nbsp;&nbsp;Thinking in java</font>

											<hr />原价：<font color="#FF0000" style="text-decoration: line-through;">${pd.market_price }</font>售价：<font color="#FF0000">${pd.shop_price }</font>
											<hr /> 数量:<button id="bt1">+</button><input type="text" name="number" id="number" value="1" size="2" /><button id="bt2">-</button>
											<hr /> 类别：计算机

											<hr />
											<p>
												<b>内容简介：</b>
											</p> java 经典书籍</td>
									</tr>
								</table></td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
	</div>


	<jsp:include page="foot.jsp" />


</body>
</html>
<script type="text/javascript">
$(function(){
	$("#bt1").click(function(){
		var number=$("#number").val();
		number++;
		$("#number").val(number);
	});
	
	$("#bt2").click(function(){
		var number1=$("#number").val();
		if(number1>1){
			number1--;
		}
		$("#number").val(number1);
	});
});
</script>
<script type="text/javascript">
  $(function(){
	  
	  $("#imgbutton").click(function(){
		  var number=$("#number").val();
		  window.location.href="${pageContext.request.contextPath }/cartServlet?action=cart&pid="+${pd.pid}+"&number="+number+"";
	  })
	  
  })
</script>
